<form id="user_form" name="user_form" class="container_form">
	<label>
		<span class="flavel">Name</span>
		<input type="text" name="user_name"
			value="{{$user.name}}"
            dojoType="dijit.form.TextBox"
            trim="true"
            style="width: 205px;" />
	</label>
	<label>
		<span class="flavel">Benutzername</span>
		<input type="text" name="user_username"
			value="{{$user.username}}"
            dojoType="dijit.form.TextBox"
            trim="true"
            style="width: 205px;" />
	</label>
	<label>
		<span class="flavel">E-Mail</span>
		<input type="text" name="user_mail"
			value="{{$user.mail}}"
            dojoType="dijit.form.TextBox"
            trim="true"
            style="width: 205px;" />
	</label>
	<label>
		<span class="flavel">Neues Passwort</span>
		<input type="text" name="user_new_passwd"
            dojoType="dijit.form.TextBox"
            trim="true"
            style="width: 205px;" />
	</label>
	<label>
		<span class="flavel">Mitgliedschaften</span>
		<select class="fselect"
            name="user_memberships"
			size="7"
			style="float:left; width: 205px;">
			{{foreach from=$memberships item=object}}
			{{if $object.id eq $user.group}}
			<option value="primary">{{$object.name}} *</option>
			{{elseif !$object.is_writeable}}
			<option value="notreadable_{{$object.id}}">{{$object.name}}</option>
			{{else}}
			<option value="{{$object.id}}">{{$object.name}}</option>
			{{/if}}
			{{/foreach}}
		</select>
		{{if $user.is_writeable}}
		<a class="remove" href="javascript:user_group_delete({{$user.id}});" title="Gruppe entfernen">
			<span>remove group</span>
		</a>
		{{/if}}
		<p style="clear: both;"></p>
	</label>
	<label>
		<span class="flavel"></span>
		<select dojoType="dijit.form.FilteringSelect"
			id="user_group_add"
			name="user_group_add"
			autocomplete="true"
			style="width: 155px;">
			{{foreach from=$available_groups item=object}}
			<option value="{{$object.id}}">{{$object.name}}</option>
			{{/foreach}}
		</select>
		<button dojoType=dijit.form.Button type="button"
				onclick="user_group_add({{$user.id}});"
				{{if !$user.is_writeable}}disabled="disabled"{{/if}}>
			Add
		</button>
	</label>
	<p>Erstellt: {{$user.t_create}}<br />
	Geändert: {{$user.t_lastwrite}}</p>
	<button dojoType=dijit.form.Button type="button"
			onclick="user_update({{$user.id}});"
			{{if !$user.is_writeable}}disabled="disabled"{{/if}}>
		Speichern
	</button>
	<button dojoType=dijit.form.Button type="button"
			onclick="user_delete({{$user.id}});"
			{{if !$user.is_writeable}}disabled="disabled"{{/if}}>
		Löschen
	</button>
</form>